' + worksheetTitle + ''); printWindow.document.write(' '); printWindow.document.write('
'); printWindow.document.write('

⭐ ' + worksheetTitle + '

'); printWindow.document.write('
'); printWindow.document.write('
'); if (studentName) printWindow.document.write(`

Student: ${studentName}

`); if (teacherName) printWindow.document.write(`

Teacher: ${teacherName}

`); if (includeDate) printWindow.document.write(`

Date: ${new Date().toLocaleDateString('en-GB')}

`); printWindow.document.write('
'); printWindow.document.write(`
⏱ Time: ${timeLimit} min
Score: ___ / ${problemCount}
`); printWindow.document.write('
'); printWindow.document.write('
'); problems.forEach((p, i) => { printWindow.document.write(`
${i + 1}.
${p.question}
${includeAnswers ? `
${p.answer}
` : ''}
`); }); printWindow.document.write('
'); printWindow.document.write(``); printWindow.document.write(''); printWindow.document.close(); setTimeout(() => printWindow.print(), 250); }; const downloadPDF = async (includeAnswers = false) => { const { jsPDF } = window.jspdf; const doc = new jsPDF(); doc.setFontSize(22); doc.setFont('helvetica', 'bold'); doc.setTextColor(102, 126, 234); doc.text(worksheetTitle, 105, 18, { align: 'center' }); doc.setFontSize(10); doc.setFont('helvetica', 'normal'); doc.setTextColor(0, 0, 0); let yPos = 30; if (studentName) { doc.text(`Student: ${studentName}`, 20, yPos); yPos += 5; } if (teacherName) { doc.text(`Teacher: ${teacherName}`, 20, yPos); yPos += 5; } if (includeDate) { doc.text(`Date: ${new Date().toLocaleDateString('en-GB')}`, 20, yPos); } doc.setDrawColor(245, 158, 11); doc.setFillColor(254, 243, 199); doc.roundedRect(145, 25, 45, 15, 2, 2, 'FD'); doc.setFontSize(9); doc.setFont('helvetica', 'bold'); doc.text(`Time: ${timeLimit} min`, 167, 31, { align: 'center' }); doc.text(`Score: ___ / ${problemCount}`, 167, 37, { align: 'center' }); doc.setDrawColor(102, 126, 234); doc.line(20, 45, 190, 45); let y = 52; doc.setFontSize(11); problems.forEach((p, i) => { if (y > 275) { doc.addPage(); y = 20; } doc.setFont('helvetica', 'bold'); doc.setTextColor(102, 126, 234); doc.text(`${i + 1}.`, 20, y); doc.setTextColor(0, 0, 0); const questionLines = doc.splitTextToSize(p.question, includeAnswers ? 110 : 150); doc.text(questionLines, 28, y); if (includeAnswers) { doc.setTextColor(16, 185, 129); doc.setFillColor(209, 250, 229); doc.roundedRect(155, y - 4, 35, 7, 1, 1, 'F'); doc.text(p.answer, 172, y, { align: 'center' }); } y += Math.max(8, questionLines.length * 5); }); doc.setFontSize(8); doc.setTextColor(150, 150, 150); doc.text('Generated by mixofall Mental Maths Worksheet Generator', 105, 290, { align: 'center' }); doc.save(`${worksheetTitle.replace(/\s+/g, '_')}_${includeAnswers ? 'Answers' : 'Worksheet'}.pdf`); showToast(' PDF downloaded!'); }; const downloadWord = async (includeAnswers = false) => { const { Document, Packer, Paragraph, TextRun, HeadingLevel, AlignmentType, BorderStyle } = docx; const doc = new Document({ sections: [{ children: [ new Paragraph({ text: '👤 ' + worksheetTitle, heading: HeadingLevel.HEADING_1, alignment: AlignmentType.CENTER, spacing: { after: 200 } }), ...(studentName ? [new Paragraph({ children: [new TextRun({ text: "Student: ", bold: true }), new TextRun(studentName)], spacing: { after: 80 } })] : []), ...(teacherName ? [new Paragraph({ children: [new TextRun({ text: "Teacher: ", bold: true }), new TextRun(teacherName)], spacing: { after: 80 } })] : []), new Paragraph({ children: [new TextRun({ text: "Date: ", bold: true }), new TextRun(includeDate ? new Date().toLocaleDateString('en-GB') : '___________'), new TextRun({ text: " ⏱ Time: ", bold: true }), new TextRun(`${timeLimit} min`), new TextRun({ text: " Score: ", bold: true }), new TextRun(`___ / ${problemCount}`)], spacing: { after: 300 } }), ...problems.map((p, i) => new Paragraph({ children: [new TextRun({ text: `${i + 1}. `, bold: true, size: 22, color: "6366f1" }), new TextRun({ text: p.question, bold: true, size: 22 }), ...(includeAnswers ? [new TextRun({ text: " ", size: 22 }), new TextRun({ text: p.answer, bold: true, size: 22, color: "10b981" })] : [])], spacing: { after: 180 }, border: { bottom: { color: "e5e7eb", space: 1, value: BorderStyle.SINGLE, size: 4 } } })), new Paragraph({ text: "Generated by mixofall Mental Maths Worksheet Generator", alignment: AlignmentType.CENTER, spacing: { before: 400 } }) ] }] }); Packer.toBlob(doc).then(blob => { saveAs(blob, `${worksheetTitle.replace(/\s+/g, '_')}_${includeAnswers ? 'Answers' : 'Worksheet'}.docx`); showToast(' Word document downloaded!'); }); }; const currentType = problemTypes.find(t => t.id === problemType); const currentDiff = difficulties.find(d => d.id === difficulty); return (
{/* Header */}

👉 Mental Maths Generator

Create printable maths worksheets for Primary School (Year 1-6)

18 Problem Types 3 Difficulty Levels PDF & Word Export
{/* Main Content */}
{/* Configuration Panel */}

Configuration

{/* Worksheet Title */}
setWorksheetTitle(e.target.value)} className="w-full px-3 py-2.5 rounded-xl bg-white/20 border border-white/30 text-white placeholder-gray-300 focus:outline-none focus:ring-2 focus:ring-purple-400 text-sm" placeholder="Enter title" />
{/* Names */}
setStudentName(e.target.value)} className="w-full px-3 py-2.5 rounded-xl bg-white/20 border border-white/30 text-white placeholder-gray-300 focus:outline-none focus:ring-2 focus:ring-purple-400 text-sm" placeholder="Optional" />
setTeacherName(e.target.value)} className="w-full px-3 py-2.5 rounded-xl bg-white/20 border border-white/30 text-white placeholder-gray-300 focus:outline-none focus:ring-2 focus:ring-purple-400 text-sm" placeholder="Optional" />
{/* Mixed Mode Toggle */}
{/* Problem Type Selection */} {!mixedMode && (
{problemTypes.map(type => ( ))}
)} {/* Difficulty */}
{difficulties.map(diff => ( ))}
{/* Problem Count */}
setProblemCount(Number(e.target.value))} className="w-full" />
103050
{/* Time Limit */}
setTimeLimit(Number(e.target.value))} className="w-full" />
2 min10 min20 min
{/* Include Date */}
{/* Generate Button */}
{/* Preview Panel */}

Preview

{!showPreview ? (

Configure settings and click Generate!

) : ( <>

⭐ {worksheetTitle}

{studentName &&

Student: {studentName}

} {teacherName &&

Teacher: {teacherName}

} {includeDate &&

Date: {new Date().toLocaleDateString('en-GB')}

}

⭐ {timeLimit} min

Score: ___ / {problemCount}

{problems.slice(0, 6).map((p, i) => (
{i + 1}. {p.question}
))}
{problems.length > 6 &&

... and {problems.length - 6} more problems

}
{/* Download Buttons */}

Print:

Download:

{/* Info Box */}

Worksheet Info

Type: {mixedMode ? 'Mixed' : currentType?.name}
Level: {currentDiff?.name}
Problems: {problemCount}
Time: {timeLimit} min
)}
{/* Features Section */}

⭐ Features

18 Types

Comprehensive coverage

Year 1-6

Age-appropriate levels

Timed Practice

Build speed & accuracy

Answer Keys

Easy marking

{/* Ad Space Bottom */} {/* SEO Content */}

About Mental Maths Worksheets

Why Mental Maths?

Mental maths skills are essential for everyday life and academic success. Regular practice helps children develop number sense, improve calculation speed, and build confidence with mathematics.

Problem Types Included:

  • ➕ Addition & Subtraction
  • ✖ Times Tables & Division
  • 🎯 Number Bonds (10, 20, 100)
  • 📊 Fractions & Percentages
  • 📏 Place Value & Rounding
  • 💰 Money & Time

Tips for Teachers & Parents:

  • Start easy - build confidence before increasing difficulty
  • 🕒 Use timers - encourage quick recall without pressure
  • 📊 Track progress - celebrate improvements over time
  • 🔀 Mix it up - use Mixed Mode for variety
  • Daily practice - 5-10 minutes is more effective than occasional long sessions
); }; ReactDOM.render(, document.getElementById('root'));